<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<meta charset="utf-8" />
		<title></title>
		<meta name="description" content="overview & stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link href="static/css/bootstrap.min.css" rel="stylesheet" />
		<link href="static/css/bootstrap-responsive.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="static/css/font-awesome.min.css" />
		<!-- 下拉框 -->
		<link rel="stylesheet" href="static/css/chosen.css" />
		
		<link rel="stylesheet" href="static/css/ace.min.css" />
		<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
		<link rel="stylesheet" href="static/css/ace-skins.min.css" />
		
		<link rel="stylesheet" href="static/css/datepicker.css" /><!-- 日期框 -->
		<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="static/js/jquery.tips.js"></script>
		
<script type="text/javascript">
	
	
	//保存
	function save(){
			if($("#TITLE_NAME").val()==""){
			$("#TITLE_NAME").tips({
				side:3,
	            msg:'请输入题目',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#TITLE_NAME").focus();
			return false;
		}
		if($("#YAOQIU").val()==""){
			$("#YAOQIU").tips({
				side:3,
	            msg:'请输入题目要求',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#YAOQIU").focus();
			return false;
		}
		if($("#FANGXIANG").val()==""){
			$("#FANGXIANG").tips({
				side:3,
	            msg:'请输入课题类型方向',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#FANGXIANG").focus();
			return false;
		}
		if($("#LAIYUAN").val()==""){
			$("#LAIYUAN").tips({
				side:3,
	            msg:'请输入课题来源',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#LAIYUAN").focus();
			return false;
		}
		if($("#DEPARTMENT_XI").val()==""){
			$("#DEPARTMENT_XI").tips({
				side:3,
	            msg:'请输入限选学院',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#DEPARTMENT_XI").focus();
			return false;
		}
		if($("#XIANXUAN").val()==""){
			$("#XIANXUAN").tips({
				side:3,
	            msg:'请输入限选 本专科',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#XIANXUAN").focus();
			return false;
		}
		if($("#SUPERVISOR").val()==""){
			$("#SUPERVISOR").tips({
				side:3,
	            msg:'请输入出题导师姓名',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#SUPERVISOR").focus();
			return false;
		}
		if($("#MAXNUMBER").val()==""){
			$("#MAXNUMBER").tips({
				side:3,
	            msg:'请输入限选人数',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#MAXNUMBER").focus();
			return false;
		}
		if($("#CURRENTNUMBER").val()==""){
			$("#CURRENTNUMBER").tips({
				side:3,
	            msg:'请输入实际选人数',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#CURRENTNUMBER").focus();
			return false;
		}
		if($("#STATE").val()==""){
			$("#STATE").tips({
				side:3,
	            msg:'请输入题目状态   是否已删除',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#STATE").focus();
			return false;
		}
		if($("#TELPHONE").val()==""){
			$("#TELPHONE").tips({
				side:3,
	            msg:'请输入导师联系电话号码',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#TELPHONE").focus();
			return false;
		}
		if($("#IS_AFFIRM").val()==""){
			$("#IS_AFFIRM").tips({
				side:3,
	            msg:'请输入0不需要确认   1:需要双向确认',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#IS_AFFIRM").focus();
			return false;
		}
		if($("#QQ").val()==""){
			$("#QQ").tips({
				side:3,
	            msg:'请输入导师QQ号码',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#QQ").focus();
			return false;
		}
		if($("#EMAIL").val()==""){
			$("#EMAIL").tips({
				side:3,
	            msg:'请输入导师电子邮箱',
	            bg:'#AE81FF',
	            time:2
	        });
			$("#EMAIL").focus();
			return false;
		}
		$("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show();
	}
	
</script>
	</head>
<body>
	<form action="title/${msg }.do" name="Form" id="Form" method="post">
		<input type="hidden" name="TITLE_ID" id="TITLE_ID" value="${pd.TITLE_ID}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">题目:</td>
				<td><input type="text" name="TITLE_NAME" id="TITLE_NAME" value="${pd.TITLE_NAME}" maxlength="32" placeholder="这里输入题目" title="题目"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">题目要求:</td>
				<td><input type="textarea" name="YAOQIU" id="YAOQIU" value="${pd.YAOQIU}" maxlength="32" placeholder="这里输入题目要求" title="题目要求"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">课题类型方向:</td>
			<td style="height:35px;padding-top: 13px;">
			<select class="chzn-select" style="width:220px" name="FANGXIANG" id="FANGXIANG" value="${pd.FANGXIANG}" data-placeholder="${pd.FANGXIANG}">
						<option value="${pd.FANGXIANG}"></option>
						<option value='调研报告'>调研报告</option><option value='论文'>论文</option>
						<option value='毕业设计'>毕业设计</option><option value='工程技术型'>工程技术型</option>
						<option value='工程设计型'>工程设计型</option><option value='实验研究型'>实验研究型</option>
						<option value='软件开发'>软件开发</option><option value='理论研究'>理论研究</option>
						</select>
						</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">课题来源:</td>
			<td style="height:35px;padding-top: 13px;">
			<select class="chzn-select" style="width:220px" name="LAIYUAN" id="LAIYUAN" value="${pd.LAIYUAN}" data-placeholder="${pd.LAIYUAN}">
						<option value="${pd.LAIYUAN}"></option>
						<option value='科研'>科研</option><option value='教学实践'>教学实践</option>
						<option value='教育'>教育</option><option value='导师给定'>导师给定</option>
						</select>
						</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选学院:</td>
		<td style="height:35px;padding-top: 13px;">
					<select class="chzn-select" style="width:220px" name="DEPARTMENT_XI" id="DEPARTMENT_XI" value="${pd.DEPARTMENT_XI}" data-placeholder="${pd.DEPARTMENT_XI}">
					
				 <option value="${pd.DEPARTMENT_XI}"></option>
				<c:forEach items="${roleList}" var="role">
					<option value="${role.BIANMA}" <c:if test="${role.BIANMA == pd.DEPARTMENT_XI }">selected</c:if>>${role.NAME}</option>
				</c:forEach>	
				</select>
				</td>
			
			</tr>
			
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选 本专科:</td>
				<td style="height:35px;padding-top: 13px;">
			<select class="chzn-select" style="width:220px" name="XIANXUAN" id="XIANXUAN" value="${pd.XIANXUAN}" data-placeholder="${pd.XIANXUAN}">
						<option value="${pd.XIANXUAN}"></option>
						<option value='本科'>本科</option><option value='专科'>专科</option>
						</select>
						</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">出题导师姓名:</td>
				<td><input type="text" name="SUPERVISOR" id="SUPERVISOR" value="${pd.SUPERVISOR}" maxlength="32" placeholder="这里输入出题导师姓名" title="出题导师姓名"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">限选人数:</td>
				<td><input type="text" name="MAXNUMBER" id="MAXNUMBER" value="${pd.MAXNUMBER}" maxlength="32" placeholder="这里输入限选人数" title="限选人数"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">实际选人数:</td>
				<td><input type="text" name="CURRENTNUMBER" id="CURRENTNUMBER" value="${pd.CURRENTNUMBER}" maxlength="32" placeholder="这里输入实际选人数" title="实际选人数"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">题目状态   是否已删除:</td>
			<td style="height:35px;padding-top: 13px;">
			<select class="chzn-select" style="width:220px" name="STATE" id="STATE" value="${pd.STATE}" data-placeholder="${pd.STATE}">
						<option value="${pd.STATE}"></option>
						<option value='未删除'>未删除</option><option value='已删除'>已删除</option>
						</select>
						</td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师联系电话号码:</td>
				<td><input type="text" name="TELPHONE" id="TELPHONE" value="${pd.TELPHONE}" maxlength="32" placeholder="这里输入导师联系电话号码" title="导师联系电话号码"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">0不需要确认   1:需要双向确认:</td>
			<td style="height:35px;padding-top: 13px;">
			<select class="chzn-select" style="width:220px" name="IS_AFFIRM" id="IS_AFFIRM" value="${pd.IS_AFFIRM}" data-placeholder="${pd.IS_AFFIRM}">
						<option value="${pd.IS_AFFIRM}"></option>
						<option value='不需要确认'>不需要确认</option><option value='需要双向确认'>需要双向确认</option>
						</select>
						</td>			
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师QQ号码:</td>
				<td><input type="text" name="QQ" id="QQ" value="${pd.QQ}" maxlength="32" placeholder="这里输入导师QQ号码" title="导师QQ号码"/></td>
			</tr>
			<tr>
				<td style="width:70px;text-align: right;padding-top: 13px;">导师电子邮箱:</td>
				<td><input type="text" name="EMAIL" id="EMAIL" value="${pd.EMAIL}" maxlength="32" placeholder="这里输入导师电子邮箱" title="导师电子邮箱"/></td>
			</tr>
			<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
					<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
				</td>
			</tr>
		</table>
		</div>
		
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
	
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$('.date-picker').datepicker();
			
		});
		
		</script>
</body>
</html>